pub fn convert_base(num_str: &str, to_base: u32) -> String {
    let mut index = num_str.len() - 1;
    while &num_str[index..index + 1] != "(" {
        index -= 1;
    }

    let base = u32::from_str_radix(&num_str[index + 1..num_str.len() - 1], 10).unwrap();
    let mut num = u32::from_str_radix(&num_str[..index], base).unwrap();
    let mut ans = vec![];
    loop {
        let remainder = num % to_base;
        num = num / to_base;

        ans.push(std::char::from_digit(remainder, to_base).unwrap());
        if num == 0 {
            break;
        }
    }

    ans.into_iter().rev().collect()
}
